-- @owner: z@wan005
-- @date: 2022/3/3
-- @testpoint: timestamp类型作为关键字测试，部分测试点合理报错
@conn PrimaryDbBmode;
--step1:作为数据库名;expect:成功
set dolphin.b_compatibility_mode=off;
drop database if exists timestamp;
create database timestamp dbcompatibility 'B';
drop database if exists timestamp;
--step2:作为列名和字段的数据类型;expect:成功
drop table if exists t_timestamp0019 cascade;
create table t_timestamp0019(timestamp timestamp);
insert into t_timestamp0019 values(current_timestamp);
select * from t_timestamp0019;
--step3:作为索引名;expect:成功
create index timestamp on t_timestamp0019(timestamp);
drop table t_timestamp0019;
--step4:作为外部数据源名;expect:成功
drop data source if exists timestamp;
create data source timestamp;
drop data source timestamp;
--step5:作为自定义函数名;expect:报错
create function timestamp(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
reset dolphin.b_compatibility_mode;